import React from 'react';
import classnames from 'classnames';
import Icon, { ICON_NAMES } from 'components/Icon';
import {SYSTEM_RISKS} from 'utils/utils';

const VulnerabilityIcon = ({severity, onClick, showSuccess=true, showUnknown=false}) => {
    // const severityClass = severity.toLowerCase();
    const severityClass = severity.toUpperCase();

    return (
        <Icon
            name={ICON_NAMES.BEETLE_ROUND}
            onClick={onClick}
            style={{color: SYSTEM_RISKS[severityClass].color}}
            className={classnames("vulnerability-icon", "global-risk-color", {[severityClass]: !!severityClass}, {success: true})}
        />
    );
}

export default VulnerabilityIcon
